package DaEr_5_25;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Test1 {
    public static void main(String[] args) {

        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"zhangsan","list","wangwu","zhaoliu","liuqi");
        Random r = new Random();
        int index = r.nextInt(list.size());
        System.out.println("list.get() = " + list.get(index));

    }
}
